package com.tomorrowbbs.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tomorrowbbs.mapper.ForumArticleAttachmentDownloadMapper;
import com.tomorrowbbs.domain.ForumArticleAttachmentDownload;
import com.tomorrowbbs.service.IForumArticleAttachmentDownloadService;

/**
 * 用户附件下载Service业务层处理
 * 
 * @author zjz
 * @date 2024-11-09
 */
@Service
public class ForumArticleAttachmentDownloadServiceImpl implements IForumArticleAttachmentDownloadService 
{
    @Autowired
    private ForumArticleAttachmentDownloadMapper forumArticleAttachmentDownloadMapper;

    /**
     * 查询用户附件下载
     * 
     * @param fileId 用户附件下载主键
     * @return 用户附件下载
     */
    @Override
    public ForumArticleAttachmentDownload selectForumArticleAttachmentDownloadByFileId(String fileId)
    {
        return forumArticleAttachmentDownloadMapper.selectForumArticleAttachmentDownloadByFileId(fileId);
    }

    /**
     * 查询用户附件下载列表
     * 
     * @param forumArticleAttachmentDownload 用户附件下载
     * @return 用户附件下载
     */
    @Override
    public List<ForumArticleAttachmentDownload> selectForumArticleAttachmentDownloadList(ForumArticleAttachmentDownload forumArticleAttachmentDownload)
    {
        return forumArticleAttachmentDownloadMapper.selectForumArticleAttachmentDownloadList(forumArticleAttachmentDownload);
    }

    @Override
    public ForumArticleAttachmentDownload selectForumArticleAttachmentDownloadByInfo(String fileId, String userId) {
        return forumArticleAttachmentDownloadMapper.selectForumArticleAttachmentDownloadByInfo(fileId,userId);
    }

    /**
     * 新增用户附件下载
     * 
     * @param forumArticleAttachmentDownload 用户附件下载
     * @return 结果
     */
    @Override
    public int insertForumArticleAttachmentDownload(ForumArticleAttachmentDownload forumArticleAttachmentDownload)
    {
        return forumArticleAttachmentDownloadMapper.insertForumArticleAttachmentDownload(forumArticleAttachmentDownload);
    }

    /**
     * 修改用户附件下载
     * 
     * @param forumArticleAttachmentDownload 用户附件下载
     * @return 结果
     */
    @Override
    public int updateForumArticleAttachmentDownload(ForumArticleAttachmentDownload forumArticleAttachmentDownload)
    {
        return forumArticleAttachmentDownloadMapper.updateForumArticleAttachmentDownload(forumArticleAttachmentDownload);
    }

    /**
     * 批量删除用户附件下载
     * 
     * @param fileIds 需要删除的用户附件下载主键
     * @return 结果
     */
    @Override
    public int deleteForumArticleAttachmentDownloadByFileIds(String[] fileIds)
    {
        return forumArticleAttachmentDownloadMapper.deleteForumArticleAttachmentDownloadByFileIds(fileIds);
    }

    /**
     * 删除用户附件下载信息
     * 
     * @param fileId 用户附件下载主键
     * @return 结果
     */
    @Override
    public int deleteForumArticleAttachmentDownloadByFileId(String fileId)
    {
        return forumArticleAttachmentDownloadMapper.deleteForumArticleAttachmentDownloadByFileId(fileId);
    }
}
